package Test;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class Tcpsend {
	public static BufferedOutputStream bos;// created by xf 2004/06/09,
	public static BufferedInputStream bis;

	public static void main(String[] args) {
		System.out.println(" sender is begin");

		try {
			Socket ss = new Socket("192.168.2.7", 23);
			bos = new BufferedOutputStream(ss.getOutputStream());
			bis = new BufferedInputStream(ss.getInputStream());
			boolean bRunning = true;
			// while(bRunning)
			// {
			if (DealwithBuffer.sbuffer == null)
				return;
			try {
				bos.write(DealwithBuffer.sbuffer);
				bos.flush();
				System.out.println("fa song end");
			} catch (Exception e) {
				System.out.println("Sending Answer:" + e.toString());
				// LogServer.debug("Sending Answer"+ e.toString());
			}
			// }
			ss.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
